import request from '@/utils/request'

export default {

  // 查询缓存内容
  getCacheValue: (cacheName:string, cacheKey:string) => {
    return request.get('/admin/monitor/cache/getValue/' + cacheName + '/' + cacheKey)
  },

  // 清理指定名称缓存
  clearCacheName: (cacheName:any) => {
    return request.delete('/admin/monitor/cache/clearCacheName/' + cacheName)
  },

  // 清理指定键名缓存
  clearCacheKey: (cacheKey:any) => {
    return request.delete('/admin/monitor/cache/clearCacheKey/' + cacheKey)
  },

  // 清理全部缓存
  clearCacheAll: () => {
    return request.delete('/admin/monitor/cache/clearCacheAll')
  },
  // 查询缓存键名列表
  getKeys: (cacheName:string) => {
    return request.get('admin/monitor/cache/keys',{params:{cacheName:cacheName}})
  }
}